3.12 \(\int x (d+c d x)^2 (a+b \tanh ^{-1}(c x)) \, dx\)

Optimal. Leaf size=129 \[ \frac{1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )+\frac{2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac{1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac{17 b d^2 \log (1-c x)}{24 c^2}-\frac{b d^2 \log (c x+1)}{24 c^2}+\frac{1}{12} b c d^2 x^3+\frac{3 b d^2 x}{4 c}+\frac{1}{3} b d^2 x^2 \]

[Out]

(3*b*d^2*x)/(4*c) + (b*d^2*x^2)/3 + (b*c*d^2*x^3)/12 + (d^2*x^2*(a + b*ArcTanh[c*x]))/2 + (2*c*d^2*x^3*(a + b*
ArcTanh[c*x]))/3 + (c^2*d^2*x^4*(a + b*ArcTanh[c*x]))/4 + (17*b*d^2*Log[1 - c*x])/(24*c^2) - (b*d^2*Log[1 + c*
x])/(24*c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.13022, antiderivative size = 129, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {43, 5936, 12, 1802, 633, 31} \[ \frac{1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )+\frac{2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac{1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac{17 b d^2 \log (1-c x)}{24 c^2}-\frac{b d^2 \log (c x+1)}{24 c^2}+\frac{1}{12} b c d^2 x^3+\frac{3 b d^2 x}{4 c}+\frac{1}{3} b d^2 x^2 \]

Antiderivative was successfully verified.

[In]

Int[x*(d + c*d*x)^2*(a + b*ArcTanh[c*x]),x]

[Out]

(3*b*d^2*x)/(4*c) + (b*d^2*x^2)/3 + (b*c*d^2*x^3)/12 + (d^2*x^2*(a + b*ArcTanh[c*x]))/2 + (2*c*d^2*x^3*(a + b*
ArcTanh[c*x]))/3 + (c^2*d^2*x^4*(a + b*ArcTanh[c*x]))/4 + (17*b*d^2*Log[1 - c*x])/(24*c^2) - (b*d^2*Log[1 + c*
x])/(24*c^2)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 5936

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u =
IntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTanh[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 - c^2*
x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q,
 0]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1802

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 633

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[e/2 + (c*d)/(2*q),
Int[1/(-q + c*x), x], x] + Dist[e/2 - (c*d)/(2*q), Int[1/(q + c*x), x], x]] /; FreeQ[{a, c, d, e}, x] && NiceS
qrtQ[-(a*c)]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int x (d+c d x)^2 \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=\frac{1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac{2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac{1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )-(b c) \int \frac{d^2 x^2 \left (6+8 c x+3 c^2 x^2\right )}{12 \left (1-c^2 x^2\right )} \, dx\\ &=\frac{1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac{2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac{1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )-\frac{1}{12} \left (b c d^2\right ) \int \frac{x^2 \left (6+8 c x+3 c^2 x^2\right )}{1-c^2 x^2} \, dx\\ &=\frac{1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac{2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac{1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )-\frac{1}{12} \left (b c d^2\right ) \int \left (-\frac{9}{c^2}-\frac{8 x}{c}-3 x^2+\frac{9+8 c x}{c^2 \left (1-c^2 x^2\right )}\right ) \, dx\\ &=\frac{3 b d^2 x}{4 c}+\frac{1}{3} b d^2 x^2+\frac{1}{12} b c d^2 x^3+\frac{1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac{2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac{1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )-\frac{\left (b d^2\right ) \int \frac{9+8 c x}{1-c^2 x^2} \, dx}{12 c}\\ &=\frac{3 b d^2 x}{4 c}+\frac{1}{3} b d^2 x^2+\frac{1}{12} b c d^2 x^3+\frac{1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac{2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac{1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )+\frac{1}{24} \left (b d^2\right ) \int \frac{1}{-c-c^2 x} \, dx-\frac{1}{24} \left (17 b d^2\right ) \int \frac{1}{c-c^2 x} \, dx\\ &=\frac{3 b d^2 x}{4 c}+\frac{1}{3} b d^2 x^2+\frac{1}{12} b c d^2 x^3+\frac{1}{2} d^2 x^2 \left (a+b \tanh ^{-1}(c x)\right )+\frac{2}{3} c d^2 x^3 \left (a+b \tanh ^{-1}(c x)\right )+\frac{1}{4} c^2 d^2 x^4 \left (a+b \tanh ^{-1}(c x)\right )+\frac{17 b d^2 \log (1-c x)}{24 c^2}-\frac{b d^2 \log (1+c x)}{24 c^2}\\ \end{align*}

Mathematica [A]  time = 0.0879692, size = 107, normalized size = 0.83 \[ \frac{d^2 \left (6 a c^4 x^4+16 a c^3 x^3+12 a c^2 x^2+2 b c^3 x^3+8 b c^2 x^2+2 b c^2 x^2 \left (3 c^2 x^2+8 c x+6\right ) \tanh ^{-1}(c x)+18 b c x+17 b \log (1-c x)-b \log (c x+1)\right )}{24 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(d + c*d*x)^2*(a + b*ArcTanh[c*x]),x]

[Out]

(d^2*(18*b*c*x + 12*a*c^2*x^2 + 8*b*c^2*x^2 + 16*a*c^3*x^3 + 2*b*c^3*x^3 + 6*a*c^4*x^4 + 2*b*c^2*x^2*(6 + 8*c*
x + 3*c^2*x^2)*ArcTanh[c*x] + 17*b*Log[1 - c*x] - b*Log[1 + c*x]))/(24*c^2)

________________________________________________________________________________________

Maple [A]  time = 0.029, size = 135, normalized size = 1.1 \begin{align*}{\frac{{c}^{2}{d}^{2}a{x}^{4}}{4}}+{\frac{2\,c{d}^{2}a{x}^{3}}{3}}+{\frac{{d}^{2}a{x}^{2}}{2}}+{\frac{{c}^{2}{d}^{2}b{\it Artanh} \left ( cx \right ){x}^{4}}{4}}+{\frac{2\,c{d}^{2}b{\it Artanh} \left ( cx \right ){x}^{3}}{3}}+{\frac{{d}^{2}b{\it Artanh} \left ( cx \right ){x}^{2}}{2}}+{\frac{bc{d}^{2}{x}^{3}}{12}}+{\frac{b{d}^{2}{x}^{2}}{3}}+{\frac{3\,b{d}^{2}x}{4\,c}}+{\frac{17\,{d}^{2}b\ln \left ( cx-1 \right ) }{24\,{c}^{2}}}-{\frac{{d}^{2}b\ln \left ( cx+1 \right ) }{24\,{c}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(c*d*x+d)^2*(a+b*arctanh(c*x)),x)

[Out]

1/4*c^2*d^2*a*x^4+2/3*c*d^2*a*x^3+1/2*d^2*a*x^2+1/4*c^2*d^2*b*arctanh(c*x)*x^4+2/3*c*d^2*b*arctanh(c*x)*x^3+1/
2*d^2*b*arctanh(c*x)*x^2+1/12*b*c*d^2*x^3+1/3*b*d^2*x^2+3/4*b*d^2*x/c+17/24/c^2*d^2*b*ln(c*x-1)-1/24*b*d^2*ln(
c*x+1)/c^2

________________________________________________________________________________________

Maxima [A]  time = 0.969073, size = 242, normalized size = 1.88 \begin{align*} \frac{1}{4} \, a c^{2} d^{2} x^{4} + \frac{2}{3} \, a c d^{2} x^{3} + \frac{1}{24} \,{\left (6 \, x^{4} \operatorname{artanh}\left (c x\right ) + c{\left (\frac{2 \,{\left (c^{2} x^{3} + 3 \, x\right )}}{c^{4}} - \frac{3 \, \log \left (c x + 1\right )}{c^{5}} + \frac{3 \, \log \left (c x - 1\right )}{c^{5}}\right )}\right )} b c^{2} d^{2} + \frac{1}{3} \,{\left (2 \, x^{3} \operatorname{artanh}\left (c x\right ) + c{\left (\frac{x^{2}}{c^{2}} + \frac{\log \left (c^{2} x^{2} - 1\right )}{c^{4}}\right )}\right )} b c d^{2} + \frac{1}{2} \, a d^{2} x^{2} + \frac{1}{4} \,{\left (2 \, x^{2} \operatorname{artanh}\left (c x\right ) + c{\left (\frac{2 \, x}{c^{2}} - \frac{\log \left (c x + 1\right )}{c^{3}} + \frac{\log \left (c x - 1\right )}{c^{3}}\right )}\right )} b d^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*d*x+d)^2*(a+b*arctanh(c*x)),x, algorithm="maxima")

[Out]

1/4*a*c^2*d^2*x^4 + 2/3*a*c*d^2*x^3 + 1/24*(6*x^4*arctanh(c*x) + c*(2*(c^2*x^3 + 3*x)/c^4 - 3*log(c*x + 1)/c^5
 + 3*log(c*x - 1)/c^5))*b*c^2*d^2 + 1/3*(2*x^3*arctanh(c*x) + c*(x^2/c^2 + log(c^2*x^2 - 1)/c^4))*b*c*d^2 + 1/
2*a*d^2*x^2 + 1/4*(2*x^2*arctanh(c*x) + c*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3))*b*d^2

________________________________________________________________________________________

Fricas [A]  time = 1.93336, size = 302, normalized size = 2.34 \begin{align*} \frac{6 \, a c^{4} d^{2} x^{4} + 2 \,{\left (8 \, a + b\right )} c^{3} d^{2} x^{3} + 4 \,{\left (3 \, a + 2 \, b\right )} c^{2} d^{2} x^{2} + 18 \, b c d^{2} x - b d^{2} \log \left (c x + 1\right ) + 17 \, b d^{2} \log \left (c x - 1\right ) +{\left (3 \, b c^{4} d^{2} x^{4} + 8 \, b c^{3} d^{2} x^{3} + 6 \, b c^{2} d^{2} x^{2}\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )}{24 \, c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*d*x+d)^2*(a+b*arctanh(c*x)),x, algorithm="fricas")

[Out]

1/24*(6*a*c^4*d^2*x^4 + 2*(8*a + b)*c^3*d^2*x^3 + 4*(3*a + 2*b)*c^2*d^2*x^2 + 18*b*c*d^2*x - b*d^2*log(c*x + 1
) + 17*b*d^2*log(c*x - 1) + (3*b*c^4*d^2*x^4 + 8*b*c^3*d^2*x^3 + 6*b*c^2*d^2*x^2)*log(-(c*x + 1)/(c*x - 1)))/c
^2

________________________________________________________________________________________

Sympy [A]  time = 2.45654, size = 167, normalized size = 1.29 \begin{align*} \begin{cases} \frac{a c^{2} d^{2} x^{4}}{4} + \frac{2 a c d^{2} x^{3}}{3} + \frac{a d^{2} x^{2}}{2} + \frac{b c^{2} d^{2} x^{4} \operatorname{atanh}{\left (c x \right )}}{4} + \frac{2 b c d^{2} x^{3} \operatorname{atanh}{\left (c x \right )}}{3} + \frac{b c d^{2} x^{3}}{12} + \frac{b d^{2} x^{2} \operatorname{atanh}{\left (c x \right )}}{2} + \frac{b d^{2} x^{2}}{3} + \frac{3 b d^{2} x}{4 c} + \frac{2 b d^{2} \log{\left (x - \frac{1}{c} \right )}}{3 c^{2}} - \frac{b d^{2} \operatorname{atanh}{\left (c x \right )}}{12 c^{2}} & \text{for}\: c \neq 0 \\\frac{a d^{2} x^{2}}{2} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*d*x+d)**2*(a+b*atanh(c*x)),x)

[Out]

Piecewise((a*c**2*d**2*x**4/4 + 2*a*c*d**2*x**3/3 + a*d**2*x**2/2 + b*c**2*d**2*x**4*atanh(c*x)/4 + 2*b*c*d**2
*x**3*atanh(c*x)/3 + b*c*d**2*x**3/12 + b*d**2*x**2*atanh(c*x)/2 + b*d**2*x**2/3 + 3*b*d**2*x/(4*c) + 2*b*d**2
*log(x - 1/c)/(3*c**2) - b*d**2*atanh(c*x)/(12*c**2), Ne(c, 0)), (a*d**2*x**2/2, True))

________________________________________________________________________________________

Giac [A]  time = 1.23304, size = 188, normalized size = 1.46 \begin{align*} \frac{1}{4} \, a c^{2} d^{2} x^{4} + \frac{1}{12} \,{\left (8 \, a c d^{2} + b c d^{2}\right )} x^{3} + \frac{3 \, b d^{2} x}{4 \, c} + \frac{1}{6} \,{\left (3 \, a d^{2} + 2 \, b d^{2}\right )} x^{2} - \frac{b d^{2} \log \left (c x + 1\right )}{24 \, c^{2}} + \frac{17 \, b d^{2} \log \left (c x - 1\right )}{24 \, c^{2}} + \frac{1}{24} \,{\left (3 \, b c^{2} d^{2} x^{4} + 8 \, b c d^{2} x^{3} + 6 \, b d^{2} x^{2}\right )} \log \left (-\frac{c x + 1}{c x - 1}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*d*x+d)^2*(a+b*arctanh(c*x)),x, algorithm="giac")

[Out]

1/4*a*c^2*d^2*x^4 + 1/12*(8*a*c*d^2 + b*c*d^2)*x^3 + 3/4*b*d^2*x/c + 1/6*(3*a*d^2 + 2*b*d^2)*x^2 - 1/24*b*d^2*
log(c*x + 1)/c^2 + 17/24*b*d^2*log(c*x - 1)/c^2 + 1/24*(3*b*c^2*d^2*x^4 + 8*b*c*d^2*x^3 + 6*b*d^2*x^2)*log(-(c
*x + 1)/(c*x - 1))